package com.ruoyi.huanjing.service;

import com.ruoyi.huanjing.domain.RegionInfo;
import com.ruoyi.huanjing.entity.AtmosphericLogData;
import ucar.ma2.InvalidRangeException;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 大气环境NC文件Service接口
 * 
 * @author xu
 * @date 2025-07-23
 */
public interface IAtmosphericNcFileService
{
    Map<String,Object> dimension(String filePath);
    List<RegionInfo> readRegionList(String filePath);
    Map<String, Object> sunReadValidTime(String filePath, Integer year, Integer month) throws IOException;
    List<Map<String, String>> sunReadAllVariables(String filePath);
    Map<String, Object> sunReadHeatmap(String filePath, int timeIndex, String val  ) throws IOException, InvalidRangeException;
    Map<String, Object> processReadSunHeatmapRegion(String filePath, int timeIndex, String val, Long regionId,Double precision);
    Map<String,Object> sunReadLineChart(String filePath, double targetLon, double targetLat, String val,List<Integer> timeIndexList) throws IOException;
    List<Map<Object,Object>> processReadAllPressureLevel(String filePath) throws IOException;
    Map<String, Object> profilesReadHeatmap(String filePath, int timeIndex, int pressureIndex, String val) throws IOException, InvalidRangeException;
    Map<String, Object> processReadProfilesHeatmapByRegion(String filePath, int timeIndex, int pressureIndex, String val, Long regionId, Double precision);
    Map<String,Object>  profilesReadLineChart(String filePath, double targetLon, double targetLat, String val, int timeIndex) throws IOException;

    Map<String,Object> read2DHeatmap(String filePath,String val);

    BufferedImage generateHeatmapImage(String filePath, String val);

    Map<String,Object> read1DLineChart(String filePath,String val);

    List<Map<String, String>> get2DParameters(String filePath);


    Map<String, Object> readLogFile(String filePath);



    List<String> readDatBySeaCurrentTime(String filePath);

    Map<String, Object> readDatBySeaCurrentTimeSeries(String filePath,String targetTime);

    List<String> readTxtBySeaCurrentTime(String filePath);

    Map<String, Object> readTxtBySeaCurrentTimeSeries(String filePath, String targetTime);

    List<String>  readOsfUniversalTime(String filePath);

    Map<String, Object> readOsfUniversalProfile(String filePath, String targetTime);

    Map<String, Object> readDateVariableByMat(String filePath, Integer year, Integer month) throws IOException;

    List<Map<Object,Object>> processReadAllDepthLevel(String filePath) throws IOException;

    Map<String, Object> netcdfReadOceanCurrentHeatmap(String filePath, int timeIndex, int depthIndex, String val) throws IOException, InvalidRangeException;

    Map<String, Object> oceanCurrentDepthLineChart(String filePath, double targetLon, double targetLat, String val, int timeIndex) throws IOException;

    List<Map<String, String>> processReadAllParametersByOceanCurrent(String filePath);

    Map<String,Object> readOceanCurrentTimeSeries(String filePath, String val);
}